<g:if test="${list}">
  <ul>
    <g:each var="object" in="${list}">
      <li><g:link controller="${controller}" action="${action}" id="${object?.id}">${object?.encodeAsHTML()}</g:link></li>
    </g:each>
  </ul>
</g:if>
<g:else>
  ${emptyMessage}<br />
</g:else>
